package com.jd.fruit.common.handler;

import java.io.File;
import java.util.Map;

/**
 *业务帮助类
 * @author lishunfeng
 *
 */
public class ServiceHandler {
	 private static Map<String, String> authorityUri = null;
	 static File imgFile =null;
	
	/**
	 * 统一删除上传图片	
	 * @return
	 */
	 public static boolean delFile(String rootPath,String delFileName){ 
		 imgFile = new File(rootPath + "/" + delFileName);
		// 删除上传的图片
		if (imgFile.exists()) {
			try {
				return imgFile.delete();
			} catch (Exception e) {
				return false;
			}
		}else{
			return true;
		}
	 }
	 
}
